package com.sskj.postar.model;

import javax.persistence.*;
import java.util.List;

@Table(name = "fabi_trade")
public class FabiTrade {
    @Id
    private Integer id;

    /**
     * 订单id
     */
    @Column(name = "trade_order_id")
    private String tradeOrderId;

    /**
     * 支付参考号
     */
    @Column(name = "pay_code")
    private String payCode;

    /**
     * 申诉参考号
     */
    @Column(name = "appeal_code")
    private String appealCode;

    /**
     * 买家id
     */
    @Column(name = "buyyer_id")
    private Integer buyyerId;

    /**
     * 卖家id
     */
    @Column(name = "seller_id")
    private Integer sellerId;

    /**
     * 单价
     */
    private String price;

    /**
     * 数量
     */
    private String num;

    /**
     * 卖家支付方式,逗号隔开
     */
    @Column(name = "seller_pay_type")
    private String sellerPayType;

    /**
     * 订单状态
     * 1 未支付
     * 2 未放币
     * 3 已完成
     * 4 申诉中
     * 5 已取消
     */
    private Integer status;

    /**
     * 发布单id
     */
    @Column(name = "publish_order_id")
    private Integer publishOrderId;

    /**
     * 申诉原因
     */
    @Column(name = "appeal_reason")
    private String appealReason;

    /**
     * 申诉类型
     */
    @Column(name = "appeal_type")
    private Integer appealType;


    /**
     * 创建时间
     */
    @Column(name = "create_time")
    private String createTime;
    /**
     * 取消时间
     */
    @Column(name = "cancel_time")
    private String cancelTime;
    /**
     * 完成时间
     */
    @Column(name = "complete_time")
    private String completeTime;
    /**
     * 买家支付时间
     */
    @Column(name = "buyer_pay_time")
    private String buyerPayTime;
    /**
     * 申诉发起时间
     */
    @Column(name = "appeal_time")
    private String appealTime;

    public String getCreateTime() {
        return createTime;
    }

    public Long getLeftDownTime() {
        return leftDownTime;
    }

    public void setLeftDownTime(Long leftDownTime) {
        this.leftDownTime = leftDownTime;
    }

    public void setCreateTime(String createTime) {
        this.createTime = createTime;
    }

    @Transient
    private Long leftDownTime;

    @Transient
    private List<UserPayInfo> userPayInfos;

    public List<UserPayInfo> getUserPayInfos() {
        return userPayInfos;
    }

    public void setUserPayInfos(List<UserPayInfo> userPayInfos) {
        this.userPayInfos = userPayInfos;
    }

    public String getCancelTime() {
        return cancelTime;
    }

    public void setCancelTime(String cancelTime) {
        this.cancelTime = cancelTime;
    }

    public String getCompleteTime() {
        return completeTime;
    }

    public void setCompleteTime(String completeTime) {
        this.completeTime = completeTime;
    }

    public String getBuyerPayTime() {
        return buyerPayTime;
    }

    public void setBuyerPayTime(String buyerPayTime) {
        this.buyerPayTime = buyerPayTime;
    }

    public String getAppealTime() {
        return appealTime;
    }

    public void setAppealTime(String appealTime) {
        this.appealTime = appealTime;
    }

    /**
     * @return id
     */
    public Integer getId() {
        return id;
    }

    /**
     * @param id
     */
    public void setId(Integer id) {
        this.id = id;
    }

    /**
     * 获取订单id
     *
     * @return trade_order_id - 订单id
     */
    public String getTradeOrderId() {
        return tradeOrderId;
    }

    /**
     * 设置订单id
     *
     * @param tradeOrderId 订单id
     */
    public void setTradeOrderId(String tradeOrderId) {
        this.tradeOrderId = tradeOrderId == null ? null : tradeOrderId.trim();
    }

    /**
     * 获取支付参考号
     *
     * @return pay_code - 支付参考号
     */
    public String getPayCode() {
        return payCode;
    }

    /**
     * 设置支付参考号
     *
     * @param payCode 支付参考号
     */
    public void setPayCode(String payCode) {
        this.payCode = payCode == null ? null : payCode.trim();
    }

    /**
     * 获取申诉参考号
     *
     * @return appeal_code - 申诉参考号
     */
    public String getAppealCode() {
        return appealCode;
    }

    /**
     * 设置申诉参考号
     *
     * @param appealCode 申诉参考号
     */
    public void setAppealCode(String appealCode) {
        this.appealCode = appealCode == null ? null : appealCode.trim();
    }

    /**
     * 获取买家id
     *
     * @return buyyer_id - 买家id
     */
    public Integer getBuyyerId() {
        return buyyerId;
    }

    /**
     * 设置买家id
     *
     * @param buyyerId 买家id
     */
    public void setBuyyerId(Integer buyyerId) {
        this.buyyerId = buyyerId;
    }

    /**
     * 获取卖家id
     *
     * @return seller_id - 卖家id
     */
    public Integer getSellerId() {
        return sellerId;
    }

    /**
     * 设置卖家id
     *
     * @param sellerId 卖家id
     */
    public void setSellerId(Integer sellerId) {
        this.sellerId = sellerId;
    }

    /**
     * 获取单价
     *
     * @return price - 单价
     */
    public String getPrice() {
        return price;
    }

    /**
     * 设置单价
     *
     * @param price 单价
     */
    public void setPrice(String price) {
        this.price = price == null ? null : price.trim();
    }

    /**
     * 获取数量
     *
     * @return num - 数量
     */
    public String getNum() {
        return num;
    }

    /**
     * 设置数量
     *
     * @param num 数量
     */
    public void setNum(String num) {
        this.num = num == null ? null : num.trim();
    }

    /**
     * 获取卖家支付方式,逗号隔开
     *
     * @return seller_pay_type - 卖家支付方式,逗号隔开
     */
    public String getSellerPayType() {
        return sellerPayType;
    }

    /**
     * 设置卖家支付方式,逗号隔开
     *
     * @param sellerPayType 卖家支付方式,逗号隔开
     */
    public void setSellerPayType(String sellerPayType) {
        this.sellerPayType = sellerPayType == null ? null : sellerPayType.trim();
    }

    /**
     * 获取订单状态
     * 1 未支付
     * 2 未放币
     * 3 已完成
     * 4 申诉中
     * 5 已取消
     *
     * @return status - 订单状态
     * 1 未支付
     * 2 未放币
     * 3 已完成
     * 4 申诉中
     * 5 已取消
     */
    public Integer getStatus() {
        return status;
    }

    /**
     * 设置订单状态
     * 1 未支付
     * 2 未放币
     * 3 已完成
     * 4 申诉中
     * 5 已取消
     *
     * @param status 订单状态
     *               1 未支付
     *               2 未放币
     *               3 已完成
     *               4 申诉中
     *               5 已取消
     */
    public void setStatus(Integer status) {
        this.status = status;
    }

    /**
     * 获取发布单id
     *
     * @return publish_order_id - 发布单id
     */
    public Integer getPublishOrderId() {
        return publishOrderId;
    }

    /**
     * 设置发布单id
     *
     * @param publishOrderId 发布单id
     */
    public void setPublishOrderId(Integer publishOrderId) {
        this.publishOrderId = publishOrderId;
    }

    /**
     * 获取申诉原因
     *
     * @return appeal_reason - 申诉原因
     */
    public String getAppealReason() {
        return appealReason;
    }

    /**
     * 设置申诉原因
     *
     * @param appealReason 申诉原因
     */
    public void setAppealReason(String appealReason) {
        this.appealReason = appealReason == null ? null : appealReason.trim();
    }

    /**
     * 获取申诉类型
     *
     * @return appeal_type - 申诉类型
     */
    public Integer getAppealType() {
        return appealType;
    }

    /**
     * 设置申诉类型
     *
     * @param appealType 申诉类型
     */
    public void setAppealType(Integer appealType) {
        this.appealType = appealType;
    }
}